﻿Imports DAO
Imports DTO
Public Class SachBUS

    Public Function LayBang() As DataTable
        'Kiem tra business rule neu co
        Dim sachDao As New SachDAO()
        Dim dt As DataTable
        dt = sachDao.LayBang()
        Return dt
    End Function


    Public Function LayThongTin() As DataTable
        Dim sachdao As New SachDAO
        Dim dt As DataTable
        dt = sachdao.LayThongTin()
        Return dt
    End Function

    Public Function LayDanhSach() As IList
        'Kiem tra business rule neu co
        Dim sachDao As New SachDAO()
        Dim ds As IList
        ds = sachDao.LayDanhSach()
        Return ds
    End Function



    Public Function LoadDauSach() As DataTable
        'Kiem tra business rule neu co
        Dim sachDao As New SachDAO()
        Dim ls As DataTable
        ls = sachDao.LoadDauSach()
        Return ls
    End Function


    'thêm
    Public Sub Them(ByVal sachDto As SachDTO)
        'Kiem tra business rule neu co
        Dim sachDao As New SachDAO()
        sachDao.Them(sachDto)
    End Sub

    'cập nhật
    Public Sub CapNhat(ByVal maSach As SachDTO)
        Dim sachDao As New SachDAO()
        sachDao.CapNhat(maSach)
    End Sub

    'xóa
    Public Sub Xoa(ByVal maSach As SachDTO)
        'Kiem tra Business Rule neu co
        Dim sachDao As New SachDAO
        sachDao.Xoa(maSach)
    End Sub

End Class
